home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / April 96 / Re Pattern accessors < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  2.1 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Pattern accessors
  2. Sent:        4/16/96 3:49 PM
  3. Received:    4/16/96 4:01 PM
  4. From:        Henri Lamiraux, lamiraux@apple.com
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >Why does FW_CColor have a complete set of accessors:
  9. >        void            SetRGB(unsigned short r, unsigned short g, unsigned
  10. >short b);
  11. >        void            GetRGB(unsigned short& r, unsigned short& g,
  12. >unsigned short& b) const;
  13. >
  14. >and so on and so forth while FW_CPattern lacks them?? The
  15. >FW_CColorPatternRep DOES have some accessors, but they're _private_!!
  16. >What's going on here?
  17. >
  18. >I'm also wondering about the split of characteristics between FW_CInkRep
  19. >and FW_CStyleRep. IE, why does the Style have a pattern in it and why does
  20. >the Ink not have it and so on and so forth. In fact, since all objects have
  21. >BOTH, why have two things to completely describe the drawing mode?
  22. >
  23. >And one further puzzlement - how does one get from a Style to a color 
  24. >pattern?
  25. >Thanx in advance.
  26. >
  27. >Martin
  28.  
  29. The ODF graphics uses the Quickdraw GX style. A shape needs an ink, a 
  30. style and a font (only necessary for text based shapes). An ink 
  31. represents the foregroung, background and transfer mode. The style 
  32. represents the pensize, the pattern (Black and White or Color) and the 
  33. pen style (dashed, doted...). The font has the font size, style and name. 
  34. So, an ink and a style are two very different objects. It is normal they 
  35. don't have the same API.
  36.  
  37. To go from a style to a pattern calls myStyle->GetPattern. 
  38.  
  39. When you say pattern doesn't have Get and SetRGB are you thinking about 
  40. the Mac call MakeRGBPat? This is something we are currently missing. You 
  41. can still do it by creating a Macintosh Pixpat using MakeRGBPat and 
  42. create a FW_CPattern using the PixPat.
  43.  
  44.  
  45. .......................................................................
  46.  Henri Lamiraux                                      lamiraux@apple.com
  47.  Apple Computer, Inc.                 OpenDoc(tm) Development Framework
  48. .......................................................................
  49.  
  50.  
  51.